package com.ruimei.util;

import java.io.File;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.disk.DiskFileItem;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

public class MultpartfileUtil
{
  public static void checkType(HttpServletRequest request, String type) {}
  
  public static File multipartToFile(MultipartFile multfile)
    throws IOException
  {
    CommonsMultipartFile cf = (CommonsMultipartFile)multfile;
    
    DiskFileItem fi = (DiskFileItem)cf.getFileItem();
    File file = fi.getStoreLocation();
    
    return file;
  }
}


/* Location:              E:\360MoveData\Users\admin\Desktop\teacher_wap-0.0.1-SNAPSHOT.jar!\BOOT-INF\classes\com\ruime\\util\MultpartfileUtil.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       0.7.1
 */